import request from '@/config/axios'

// 下载车抵贷模板
export const downloadCarLoanTemplate = () => {
  return request.download({ url: '/weiyi/data-import/car-loan/get-import-template' })
}

// 下载信用贷模板
export const downloadCreditLoanTemplate = () => {
  return request.download({ url: '/weiyi/data-import/credit-loan/get-import-template' })
}

// 下载公积金模板
export const downloadHouseFundTemplate = () => {
  return request.download({ url: '/weiyi/data-import/house-fund/get-import-template' })
}

// 导入车抵贷数据
export const importCarLoanData = (data: FormData) => {
  return request.upload({
    url: '/weiyi/data-import/car-loan/import',
    data
  })
}

// 导入信用贷数据
export const importCreditLoanData = (data: FormData) => {
  return request.upload({
    url: '/weiyi/data-import/credit-loan/import',
    data
  })
}

// 导入公积金数据
export const importHouseFundData = (data: FormData) => {
  return request.upload({
    url: '/weiyi/data-import/house-fund/import',
    data
  })
}

// 更新数据接收配置状态
export const updateDataReceiveConfigStatus = (params: {
  id: number,
  status: number
}) => {
  return request.post({
    url: '/app-api/weiyi/data/receive-config/update-status', 
    params
  })
} 